package com.example.user.coolrun.runnershign;

import android.content.Intent;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import com.example.user.coolrun.R;


public class StartActivity extends AppCompatActivity{
    private CircleProgress mProgressView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start);

        mProgressView = (CircleProgress) findViewById(R.id.progress);
        mProgressView.startAnim();

        new Handler().postDelayed(new Runnable() {
            public void run() {
                final Intent mainIntent = new Intent(StartActivity.this, Menu.class);
                StartActivity.this.startActivity(mainIntent);
                StartActivity.this.finish();
                overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
            }
        }, 5000);
        }
}